/* eslint-disable */
const QRCode = require('./lib/QRCode')
const ErrorCorrectLevel = require('./lib/ErrorCorrectLevel')

const qrcode = function (data, opt) {
  opt = opt || {}
  const qr = new QRCode(opt.typeNumber || -1,
    opt.errorCorrectLevel || ErrorCorrectLevel.H)
  qr.addData(data)
  qr.make()

  return qr
}

qrcode.ErrorCorrectLevel = ErrorCorrectLevel

module.exports = qrcode
